package com.qf.job;

import org.apache.shardingsphere.elasticjob.api.ShardingContext;
import org.apache.shardingsphere.elasticjob.simple.job.SimpleJob;
import org.springframework.stereotype.Component;

/*
 *@Description:分布式任务调度类
 *@author:刘哥
 *@Date:86180 2022/10/13 22:13
 */
@Component
public class MyJob implements SimpleJob {


    @Override
    public void execute(ShardingContext shardingContext) {
        int shardingItem = shardingContext.getShardingItem();
//        执行定时任务
        System.out.println("定时任务执行了");
    }
}
